The invention relates to a smoothing process, using heat treatment, of a rough surface of a first substrate comprising at the surface a semiconductor alloy based on at least two elements chosen from Ga, As, Al, In, P and N.